-
"COP is not a formal paradigm, but a set of principles that can be applied to any programming style to create more efficient and organized systems."
-
-
Make your code usable before you try to make it reusable.
-
Starting with the details and repeatedly compressing to arrive at the eventual architecture avoids all the pitfalls of trying to conceive the architecture ahead of time.
-
"This is the correct way to give birth to “objects”. We made a real, usable bundle of code and data: the Panel_Layout structure and its member functions. It does exactly what we want, it fits perfectly, it’s really easy to use, it was trivial to design."
-
But if you just forget all that, and write simple code, you can always create your objects after the fact and you will find that they are exactly what you wanted.
-
I spend exactly zero time thinking about “objects” or what goes where.
-
The fallacy of “object-oriented programming” is exactly that: that code is at all “object-oriented”. It isn’t.
-
Code is procedurally oriented, and the “objects” are simply constructs that arise that allow procedures to be reused .
-
if you just let that happen instead of trying to force everything to work backwards, programming becomes immensely more pleasant.
-
After reading :
-
Very nice, it's a very good article.
-
The way he designed the UI example architecture reminded me A LOT of how Blender's API works, at least the layout construction part.
-
-
-
Casey and Primeagen - "what should be put inside a struct?" {51:44 -> 59:40} .
-
"You can have 2 reasons:"
-
It helps the CPU with performance.
-
It helps me be less confused and make fewer mistakes.
-
-
"Never make a structural decision based on what some book told you".
-
-
Quake used one big entity struct, on systems with 8mb RAM and 90mhz Pentiums.
COP (Compression-Oriented Programming) / Mega-Struct